package com.model.dto.sys.userController;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * @Author: zql
 * @Description:
 * @Data: 14:41 2021/7/22
 */
@Data
public class GetPasswordKeyByEmailDTO {
    /** 邮箱 */
    @ApiModelProperty(value = "邮箱长度限制为50")
    @NotNull(message = "邮箱不能为空")
    @Size(min = 0, max = 50, message = "邮箱长度限制为50")
    @Pattern(regexp = "\\b[\\w.%+-]+@[\\w.-]+\\.[a-zA-Z]{2,6}\\b", message = "邮箱格式不合法")
    String email;

    @ApiModelProperty(value = "验证码不能为空，验证码长度限制为4位",required = true)
    @NotNull(message = "验证码不能为空")
    @Size(min = 4, max = 4, message = "验证码长度限制为4位")
    String code;
}
